const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  /*
    // 相当于写的是这个
    token: function (state) {
      return state.user.token
    }
    token (state) {
        retuen state.user.token
    }
  */
  userInfo: state => state.user.userInfo,
  // vuex里的计算属性,用计算属性可以快速访问子模块里的数据
  routes: state => state.permission.routes
}
export default getters
